package com.pajk.user.model;

import java.io.Serializable;
import java.util.List;

import com.pajk.user.model.enums.QuestionLevel;
import com.pajk.user.model.enums.QuestionType;
import net.pocrd.annotation.Description;

/**
 * Created by haomin on 4/29/14.
 */
@Description("安全问题列表")
public class SafetyQuestions implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -6509193811035132036L;
    @Description("安全问题列表id")
    public String questionUID;
    @Description("安全问题列表")
	public List<SafetyQuestion> questions;

    /**
     *中医体质枚举
     */
    public enum Physique {
    	PHZ("平和质"),QXZ("气虚质"),YAXZ("阳虚质"),YINXZ("阴虚质"),
    	TSZ("痰湿质"),SRZ("湿热质"),XYZ("血瘀质"),QYZ("气郁质"),TBZ("特禀质");
    	private Physique(String nameCn) {
    		this.nameCn = nameCn;
    	}
    	private String nameCn;
		public String getNameCn() {
			return nameCn;
		}
		public void setNameCn(String nameCn) {
			this.nameCn = nameCn;
		}
    	
    }

    @Description("安全问题")
    public class SafetyQuestion implements Serializable {
    	
    	public SafetyQuestion() {}
    	
    	
    	public SafetyQuestion(int templeteId, String question,
				QuestionLevel questionLevel, QuestionType questionType) {
			super();
			this.templeteId = templeteId;
			this.question = question;
			this.questionLevel = questionLevel.ordinal();
			this.questionType = questionType.ordinal();
		}


		public SafetyQuestion(int templeteId, String question,
				QuestionLevel questionLevel, QuestionType questionType,
				List<Option> options) {
			super();
			this.templeteId = templeteId;
			this.question = question;
			this.questionLevel = questionLevel.ordinal();
			this.questionType = questionType.ordinal();
			this.options = options;
		}


		private static final long serialVersionUID = 9109338469030258392L;
        @Description("问题模板主键")
    	public int templeteId;
        @Description("问题")
    	public String question;
        @Description("级别")
    	public int questionLevel;
        @Description("问题类型")
    	public int questionType;
        @Description("答案选项")
    	public List<Option> options;



		/**
		 * 选项
		 *
		 */
        @Description("安全问题选项")
		public class Option implements Serializable {
			private static final long serialVersionUID = -8584860703620489678L;
            @Description("选项代码")
			public String code;
            @Description("选项名称")
			public String name;
			public Option () {}
			public Option(String code, String name) {
				super();
				this.code = code;
				this.name = name;
			}
		}
    }

}
